package com.ruoyi.project.system.mynotice.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.mynotice.domain.MyNotice;
import com.ruoyi.project.system.mynotice.mapper.MyNoticeMapper;
import com.ruoyi.project.system.mynotice.service.MyNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 通知公告 服务层
 */
@Service
public class MyNoticeServiceImpl implements MyNoticeService {

    @Autowired
    private MyNoticeMapper myNoticeMapper;

    @Override
    public List<MyNotice> findAllMyNotice(String noticeClass) {
        return myNoticeMapper.selectAllNotice(noticeClass);
    }

    @Override
    public int deleteMyNoticeById(String ids) {
        return myNoticeMapper.deleteMyNoticeById(Convert.toStrArray(ids));
    }

    @Override
    public int addMyNotice(MyNotice myNotice) {
        return myNoticeMapper.addMyNotice(myNotice);
    }

    @Override
    public MyNotice selectMyNoticeById(Long id) {
        return myNoticeMapper.selectMyNoticeById(id);
    }

    @Override
    public int updateMyNotice(MyNotice myNotice) {
        return myNoticeMapper.updateMyNotice(myNotice);
    }
}
